package cn.wenxin;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * Created by Wenxin on 2017/10/20.
 */
public class Demo {

    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"consumer.xml"});
        context.start();
        DemoService bean = (DemoService) context.getBean("demoService");
        String wenxin = bean.sayHello("Wenxin");
        System.out.println(wenxin);
    }

}
